home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 31 / PC Gamer IT CD 31 1-2.iso / DINKDEMO / dink101.exe / DINK / STORY / ESCAPE.C < prev    next >
C/C++ Source or Header  |  1997-10-15  |  3KB  |  159 lines

  1. //this is run when the escape key is pressed
  2.  
  3. void main(void)
  4. {
  5. Playsound(18, 22050, 0,0,0);
  6. freeze(1);
  7. help:
  8.         choice_start();
  9.         "Load a previously saved game"
  10.         "Restart"
  11.         "Quit to Windows"
  12.         "Help"
  13.         "Continue"
  14.         choice_end();
  15.  
  16.  
  17. if (&result == 1)
  18.   {
  19.         choice_start();
  20.         "&savegameinfo"
  21.         "&savegameinfo"
  22.         "&savegameinfo"
  23.         "&savegameinfo" 
  24.         "&savegameinfo" 
  25.         "&savegameinfo" 
  26.         "&savegameinfo" 
  27.         "&savegameinfo" 
  28.         "&savegameinfo" 
  29.         "&savegameinfo" 
  30.         "Nevermind"
  31.         choice_end();
  32. if (&result == 11) goto help;
  33.  
  34. if (game_exist(&result) == 0)
  35.   {
  36.   unfreeze(1);
  37.   wait(2000);  
  38.   Say("Wow, this loaded game looks so familiar.", 1);
  39.   kill_this_task();
  40.     return;
  41.    }
  42.   unfreeze(1);
  43.   load_game(&result);
  44.  &update_status = 1;
  45.  draw_status();
  46.  
  47.   kill_this_task();
  48.   }
  49.  
  50.  
  51.  
  52.  
  53. if (&result == 3)
  54.   {
  55.         choice_start();
  56.         "Yes, I really want to quit the game"
  57.         "I was just kidding, back to the action, please"
  58.         choice_end();
  59.    if (&result == 2)
  60.    {
  61.     wait(300);
  62.     say("Phew, that was a close one!",1);
  63.    }
  64.    if (&result == 1)
  65.    {
  66.    kill_game();
  67.    }
  68.   unfreeze(1);
  69.   kill_this_task();
  70.   }
  71.  
  72.   if (&result == 4)
  73.   {
  74. helpstart:
  75.         choice_start();
  76.         set_y 240
  77.         title_start();
  78.  
  79.  
  80.  
  81.  
  82. What would you like help on?
  83.         title_end();
  84.         "Keyboard commands"
  85.         "How to save the game"
  86.         "Done"
  87.         choice_end();
  88. Debug("Ok, result is &result");
  89.  
  90.       if (&result == 1)
  91.      {
  92.         choice_start();
  93.         set_y 240
  94.         title_start();
  95. Ctrl = Attack/choose
  96. Space = Talk/examine/skip text
  97. Shift = Magic
  98. Enter = Item/magic equip screen
  99.  
  100. Use the arrow keys to move.  Joystick and control pad are also supported.
  101.         title_end();
  102.         "Ok"
  103.         choice_end();
  104.        goto helpstart;
  105.      }
  106.  
  107.       if (&result == 2)
  108.      {
  109.         choice_start();
  110.         set_y 240
  111.         title_start();
  112. In this quest, saving your game can
  113. only be done at the special 'Save
  114. Machine'. (it hums strangely)
  115.  
  116. When you find one, it's location
  117. will be added to your map.
  118.         title_end();
  119.         "Ok"
  120.         choice_end();
  121.        goto helpstart;
  122.      }
  123.  
  124.  
  125.       if (&result == 3)
  126.       {
  127.        goto help;
  128.       }
  129.  
  130.  
  131.   }
  132.  
  133.  
  134. if (&result == 2)
  135.   {
  136.         choice_start();
  137.         "Yes, I really want to restart from scratch"
  138.         "No, go back!"
  139.         choice_end();
  140.    if (&result == 2)
  141.    {
  142.    goto help;
  143.    }
  144.    if (&result == 1)
  145.    {
  146.    unfreeze(1);
  147.    restart_game();
  148.    kill_this_task();
  149.    }
  150.   unfreeze(1);
  151.   kill_this_task();
  152.   }
  153.  
  154.  
  155.  
  156.   unfreeze(1);
  157.   kill_this_task();
  158. }
  159.